﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using VERKProjectHopur16.Helpers;


namespace VERKProjectHopur16.Controllers
{
    /// <summary>
    /// ParentController overwrites the OnException which catches all unhandeled exception
    /// thrown by controller that inherited from it.+
    /// All controllers inherit from the controller log loggin purposes.
    /// NO OTHER FUNCTIONALITY SHOULD BE ADDED TO THIS CONTROLLER.
    /// </summary>
    [HandleError]
    public class ParentController : Controller
    {
        protected override void OnException(ExceptionContext fc)
        {
            base.OnException(fc);
            Exception ex = fc.Exception;
            Logger.Instance.LogException(ex);
        }
    }
}
